package com.novunda.platform.common.web.bean;

import com.novunda.platform.common.dialects.shiro.ShiroFacade;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * @author linfeng
 * @since 2016/10/17.
 */
@Component
public class PermissionBean implements Serializable {
    private static final long serialVersionUID = 8400969965205861723L;

    /**
     * 判断使用有权限
     * @param permission 权限字符串
     * @return 是否有权限
     */
    public Boolean hasPermission(String permission) {
        return ShiroFacade.hasPermission(permission);
    }

}
